<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>巡检设备</title>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/form.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/plandevicetaskdetail.css" />
    <link rel="stylesheet" type="text/css" href="css/detailstyle.css" />
    <link rel="stylesheet" type="text/css" href="../script/vant/index.css" />
    <style>
        textarea{
            margin-left: 16px;
            margin-right: 16px;
        }
        textarea::placeholder{
            padding-left: 2px;
        }
        .noinfo{
            color: #ddd;
            padding-top: 10%;
        }
        .mb30{
            margin-bottom: 30px !important;
        }
        .ycbtn{
            height: 52px;
            line-height: 52px;
            border-top: solid 1px #eee;
            text-align: center;
        }
        .van-action-sheet__cancel{
            padding-bottom: 40px;
        }
        .equipment_list_box_term_input{
            padding: 6px 0 0px 0;
            border-bottom: 0;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="boxarea detail">
            <div class="aui_formitem">
                <div class="aui_formtitle">
                    设备名称
                </div>
                <div class="aui_formcontent">
                    {{form.DeviceName}}
                </div>
            </div>
            <div class="aui_formitem">
                <div class="aui_formtitle">
                    设备编码
                </div>
                <div class="aui_formcontent">
                    {{form.DeviceNo}}
                </div>
            </div>
            <div class="aui_formitem">
                <div class="aui_formtitle">
                    规格型号
                </div>
                <div class="aui_formcontent">
                    {{form.DeviceModel?form.DeviceModel:'--'}}
                </div>
            </div>
            <div class="aui_formitem">
                <div class="aui_formtitle">
                    存放位置
                </div>
                <div class="aui_formcontent">
                    {{form.DeviceLocationPlace?form.DeviceLocationPlace:'--'}}
                </div>
            </div>
            <div class="aui_formitem">
                <div class="aui_formtitle">
                    所属项目
                </div>
                <div class="aui_formcontent">
                    {{form.ProjectName}}
                </div>
            </div>
            <div class="aui_formitem">
                <div class="aui_formtitle">
                    签到时间
                </div>
                <div class="aui_formcontent">
                    {{form.CheckTime}}
                </div>
            </div>
            <div class="aui_formitem">
                <div class="aui_formtitle">
                    签到人员
                </div>
                <div class="aui_formcontent">
                    {{form.InChargeManName?form.InChargeManName:'--'}}
                </div>
            </div>
        </div>
        <div class="posibox div-flex-center" >
            <div class="posiicon aui-margin-r-5">
                <i class="icon iconfont icon-dizhi"></i>
            </div>
            <div class="posicontent">{{form.GPSLocation}}</div>
            <div v-if="planform.TaskStatus==1||planform.TaskStatus==2" class="posibtn" v-on:click="StartBmap()">
                <i class="icon iconfont icon-shuaxin2-copy-copy"></i>
            </div>
        </div>
        <div class="boxarea detail equipment_list">
            <div class="equipment_title">工作标准</div>
            <div class="noinfo noinfo-mt" id="noorder" v-if="standardlist.length==0">
                该设备没有巡检标准哦
            </div>
            <!-- loop Type 1-观察  2-选择  3手动录入-->
            <div v-if="standardlist.length>0" v-for="item in standardlist" class="equipment_list_box">
                <div class="equipment_list_box_term">{{item.StandardName}}</div>
                <div v-if="item.StandardContent" class="equipment_list_box_term" style="padding-top: 2px;color: #aaa;">{{item.StandardContent}}</div>
                <div class="equipment_list_box_term_input">
                    <div v-if="item.Type!=2&&item.Type!=3">
                        <label v-if="planform.TaskStatus!=1&&planform.TaskStatus!=2" class="label_radio">
                            <input class="aui-radio" type="radio" disabled="disabled" v-bind:name="item.ID+'normal'" v-bind:checked="item.CheckStatus==1" >
                            正常
                        </label>
                        <label v-if="planform.TaskStatus!=1&&planform.TaskStatus!=2" class="label_radio">
                            <input class="aui-radio" type="radio" disabled="disabled" v-bind:name="item.ID+'normal'" v-bind:checked="item.CheckStatus==2">
                            异常
                          </label>

                        <label v-if="planform.TaskStatus==1||planform.TaskStatus==2" class="label_radio" v-on:click="select_active(item,1)">
                          <input class="aui-radio" type="radio" v-bind:name="item.ID+'normal'" v-bind:checked="item.CheckStatus==1">
                          正常
                        </label>
                        <label v-if="planform.TaskStatus==1||planform.TaskStatus==2" class="label_radio" v-on:click="select_active(item,2)">
                          <input class="aui-radio" type="radio" v-bind:name="item.ID+'normal'" v-bind:checked="item.CheckStatus==2">
                          异常
                        </label>
                    </div>
                    <div v-if="item.Type==2&&item.Type!=undefined">
                        <label v-for="itemc in item.list" class="aui-margin-r-10">
                            <van-checkbox v-if="planform.TaskStatus!=1&&planform.TaskStatus!=2" v-model="itemc.IsChecked" icon-size="24px" shape="square" :disabled="true">{{itemc.name}}</van-checkbox>
                            <van-checkbox v-if="planform.TaskStatus==1||planform.TaskStatus==2" v-model="itemc.IsChecked" icon-size="24px" shape="square" >{{itemc.name}}</van-checkbox>
                        </label>
                    </div>
                    <div v-if="item.Type==3&&item.Type!=undefined">
                        <label v-if="planform.TaskStatus!=1&&planform.TaskStatus!=2" >{{item.CheckContent?item.CheckContent:'--'}}</label>
                        <input v-if="planform.TaskStatus==1||planform.TaskStatus==2" v-model="item.CheckContent" placeholder="请录入"  type="text" style="border: solid 0.5px #ddd;border-radius: 6px;padding: 0 10px;"> 
                    </div>
                </div>
            </div>
            <!-- loop -->
        </div>
        <div class="boxarea detail equipment_result mb30">
            <div class="equipment_result_title">
                <div class="equipment_title">作业结果</div>
                <div class="equipment_result_title_input">
                    <div>
                        <label v-if="planform.TaskStatus!=1&&planform.TaskStatus!=2" class="label_radio">
                            <input class="aui-radio" type="radio"  name="allnormal" v-bind:checked="form.CheckStatus==1">
                            正常
                        </label>
                        <label v-if="planform.TaskStatus!=1&&planform.TaskStatus!=2" class="label_radio">
                            <input class="aui-radio" type="radio" disabled="" name="allnormal" v-bind:checked="form.CheckStatus==2">
                            异常
                          </label>
                        <label v-if="planform.TaskStatus==1||planform.TaskStatus==2" class="label_radio" v-on:click="select_all_active(1)">
                          <input class="aui-radio" type="radio" v-bind:disabled="standardStatus==2" name="allnormal" v-bind:checked="form.CheckStatus==1">
                          正常
                        </label>
                        <label v-if="planform.TaskStatus==1||planform.TaskStatus==2" class="label_radio" v-on:click="select_all_active(2)">
                          <input class="aui-radio" type="radio" v-bind:disabled="standardStatus==2" name="allnormal" v-bind:checked="form.CheckStatus==2">
                          异常
                        </label>
                    </div>
                </div>
                <div class="cl"></div>
            </div>
            <div class="equipment_result_edit">
                <div class="aui_formtitle contentdec">情况说明</div>
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-input">
                        <textarea v-if="planform.TaskStatus==1||planform.TaskStatus==2" placeholder="请填写详细的情况说明(选填信息)" v-model="form.TaskCompleteContent" style="width:90%; margin:auto;height: 6rem;"></textarea>
                        <span v-else style="padding-left: 18px; padding-right: 18px;">
                          {{form.TaskCompleteContent}}
                        </span>
                    </div>
                </div>
            </div>
            <div class="imglist_box">
                <div class="imglist_item" v-for="(item,index) in imglist">
                    <img v-on:click="do_viewimages(index)" class="imgitem ml4" v-bind:src="item.url" />
                    <img v-if="planform.TaskStatus==1||planform.TaskStatus==2" v-on:click="remove_img(index,item)" class="onmouse_close" src="../image/close_mouseover.svg" />
                </div>
                <div v-if="(planform.TaskStatus==1||planform.TaskStatus==2)&&imglist.length<maxuploadcount" class="imglist_item ml4">
                    <div class="img_plusbox">
                        <img v-on:click="choose_picture()" src="../image/photo_image.svg"/>
                    </div>
                    最多支持{{maxuploadcount}}张
                </div>
            </div>
            <div class="cl"></div>
            <!-- <div class="hide_height"></div> -->
        </div>
        <div v-if="planform.TaskStatus==1||planform.TaskStatus==2" class="bottom">
            <div class="aui_bottombtn" v-on:click="do_save()">提交</div>
        </div>

        <van-action-sheet v-model:show="BtnShow"  title="处理方式选择" cancel-text="取消" close-on-click-action>
            <div class="aui-margin-b-10" style="text-align: center;color: #aaa;">当前作业结果异常，请选择异常情况处理方式。</div>
            <div v-on:click="do_save_process(1)" class="ycbtn"><van-icon name="add-o" /> 创建报事报修工单</div>
            <div  v-on:click="do_save_process(2)" class="ycbtn"><van-icon name="add-o" /> 创建设备维修工单</div>
            <div  v-on:click="do_save_process(0)"  class="ycbtn">保存作业结果，不做异常处理。</div>
        </van-action-sheet>

    </div>
</body>
<script type="text/javascript " src="../script/api.js "></script>
<script type="text/javascript " src="../script/vue.js "></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../script/aui-scroll.js"></script>
<script type="text/javascript" src="../script/aui-popup.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript " src="../script/vant/vue.js"></script>
<script type="text/javascript " src="../script/vant/vant.js"></script>
<script type="text/javascript" src="js/equipment_details.js"></script>

</html>
